Repository navigation
Conversation
On a status change, we mask all possible sources of interrupts (ATTACH, ALERT and UNATTACHED). This may not be so clever, for example when a device becomes UNATTACHED we will mask the ATTACH interrupt. If a device re-attaches immediately while we are processing the interrupt and workqueue, we may never detect attachment. FIXME: we've got to get rid of the set of 'if' tests. BugLink: thesofproject#3063 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
|
||
| slv_mask = cdns_readl(cdns, CDNS_MCP_INTMASK); | ||
|
|
||
| /* FIXME: there must be a clever way to do this in one shot */ |
There was a problem hiding this comment.
slv_mask &= ~(int_status & CNDS_MCP_INT_SLAVE_MASK); ?
There was a problem hiding this comment.
I am not sure if it's equivalent but I wrote this down:
slv_mask &= (~int_status & CNDS_MCP_INT_SLAVE_MASK);
There was a problem hiding this comment.
not equal. Your method will only reserve the bit in range of CNDS_MCP_INT_SLAVE_MASK, for other no-slave int status will lost
|
After sleeping on it and lots of coffee, I am not convinced this actually works. a) the work function willl enable all interrupts cdns_updatel(cdns, CDNS_MCP_INTMASK, so there's a risk that dealing with one status change would override the masking done in a new interrupt. b) the documentation states that all interrupt handling is level-based. I still think there's a risk in the case of multiple devices on the same link, e.g.
|
On a status change, we mask all possible sources of
interrupts (ATTACH, ALERT and UNATTACHED).
This may not be so clever, for example when a device becomes
UNATTACHED we will mask the ATTACH interrupt. If a device re-attaches
immediately while we are processing the interrupt and workqueue, we
may never detect attachment.
FIXME: we've got to get rid of the set of 'if' tests.
BugLink: #3063
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com